<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "/view/head.html"/>
<script type="text/javascript">
<#if errors??>
	var msg = '';
	<#list errors as error>
	msg = msg + '${error}\n';
	</#list>
	alert(msg);
</#if>

$(function() {
	$("#jvForm").validate();
	$("#jvForm2").validate();
	$('#goods-buy').dialog({autoOpen:false,modal:true,resizable:false,width:500});
	$('#goods-export').dialog({autoOpen:false,modal:true,resizable:false,width:500});
});
</script>
</head>
<body>
<#include "/common/image_upload.html"/>
<div class="body-box">
<div class="rhead">
	<div class="rpos">电子票产品 - ${product.name}</div>
	<form class="ropt">
		<input type="button" value="返回" onclick="history.back();"/>
	</form>
	<div class="clear"></div>
</div>

<table width="100%" class="pn-ftable" cellpadding="2" cellspacing="1" border="0">
<tr>
<td width="12%" class="pn-flabel pn-flabel-h">商品名称:</td>
<td colspan="3" width="38%" class="pn-fcontent">${product.name}</td>
</tr>
<tr>
<td width="12%" class="pn-flabel pn-flabel-h">产品类别:</td>
<td colspan="3" width="38%" class="pn-fcontent">${product.type.name} - ${product.group.name}</td>
</tr>
<tr>
<td width="12%" class="pn-flabel pn-flabel-h">销售区域:</td>
<td colspan="3" width="38%" class="pn-fcontent">全国</td></td>
</tr>
<tr>
<td width="12%" class="pn-flabel pn-flabel-h">分销价格:</td><td colspan="1" width="38%" class="pn-fcontent">￥${product.partnerPrice?string(",##0.00")}</td>
<td width="12%" class="pn-flabel pn-flabel-h">成本价格:</td><td colspan="1" width="38%" class="pn-fcontent">￥${product.productPrice?string(",##0.00")}</td>
</tr>
<tr>
<td width="12%" class="pn-flabel pn-flabel-h">建议价格:</td><td colspan="1" width="38%" class="pn-fcontent">￥${product.referPrice?string(",##0.00")}</td>
<td width="12%" class="pn-flabel pn-flabel-h">市场价格:</td><td colspan="1" width="38%" class="pn-fcontent">￥${product.marketPrice?string(",##0.00")}</td>
</tr>
<tr>
<td width="12%" class="pn-flabel">产品缩略图:</td>
<td colspan="3" width="88%" class="pn-fcontent"><img id="preImg1" src="${product.imgPhoto}" alt="预览区" noResize="true" style="width:100px;height:70px;background-color:#CCCCCC;border:1px solid #333"/></td>
</tr>
<tr>
<td width="12%" class="pn-flabel pn-flabel-h">特别提示:</td>
<td colspan="3" width="88%" class="pn-fcontent">${product.hint}</td>
</tr>
<tr>
<td width="12%" class="pn-flabel pn-flabel-h">产品简介:</td>
<td colspan="3" width="88%" class="pn-fcontent">${product.summary}</td>
</tr>
<tr>
<td width="12%" class="pn-flabel pn-flabel-h">产品详情:</td>
<td colspan="3" width="88%" class="pn-fcontent">${product.detail}</td>
</tr>

<tr>
<td colspan="4" class="pn-fbutton">
<input type="button" value="抢购产品" onclick="$('#goods-buy').dialog('open');"/> &nbsp; 
<input type="button" value="导出券号" onclick="$('#goods-export').dialog('open');"/> &nbsp; 
</td>
</tr>
</table>

<div id="goods-buy" title="抢购产品">
<@p.form id="jvForm" action="${base}/order/add">
<@p.text size="35" colspan="1" label="购买数量" name="quantity" value="1" required="true" class="required digits" maxlength="100"/><@p.tr/>
<@p.text size="35" colspan="1" label="客人姓名" name="consumerName" value=user.partner.title required="true" class="required" maxlength="100"/><@p.tr/>
<@p.text size="35" colspan="1" label="身份证" name="consumerIdcard" required="true" class="required" maxlength="100"/><@p.tr/>
<@p.text size="35" colspan="1" label="手机号码" name="consumerMobile" value=user.partner.mobile id="mobile" required="true" class="required" maxlength="100"/><@p.tr/>
<@p.text size="35" colspan="1" label="确认手机号码" name="mobileAgain" value=user.partner.mobile equalTo="#mobile" required="true" class="required" maxlength="100"/><@p.tr/>
<@p.text size="35" colspan="1" label="业务员" name="salesman" value=user.realname required="true" class="required" maxlength="100"/><@p.tr/>
<@p.textarea colspan="2" label="订单备注" name="remark" maxlength="255" cols="35" rows="5"/><@p.tr/>
<@p.td colspan="1">
<@p.hidden name="product.id" value="${product.id}"/>
<input type="submit" value="购买产品"/>
</@p.td>
</@p.form>
</div>

<div id="goods-export" title="导出券号">
<@p.form id="jvForm2" action="${base}/order/add">
<@p.text size="35" colspan="1" label="导出数量" name="count" value="1" required="true" class="required digits" maxlength="100"/><@p.tr/>
<@p.textarea colspan="2" label="订单备注" name="remark" maxlength="255" cols="35" rows="5"/><@p.tr/>
<@p.td colspan="1"><input type="submit" value="导出券号"/></@p.td>
</@p.form>
</div>

</div>
<#include "/common/alert_message.html"/>
</body>
</html>
